﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetExcel.aspx.cs" Inherits="GetExcel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/ui/ui.core.js"></script>
    <script type="text/javascript" src="js/ui/ui.datepicker.js"></script>
    <link type="text/css" href="js/ui/ui.all.css" rel="stylesheet" />
    <link type="text/css" href="js/ui/demos.css" rel="stylesheet" />
    <script>
        $(function () {
            $("#start-date").datepicker(
		{ onSelect: function (dateText, inst) { $('#end-date').datepicker('option', 'minDate', new Date(dateText.replace('-', ','))); }
		});

            $("#end-date").datepicker(
		{ onSelect: function (dateText, inst) { $('#start-date').datepicker('option', 'maxDate', new Date(dateText.replace('-', ','))); }
		});
        });
        jQuery(function ($) {
            $.datepicker.regional['zh-CN'] = { dateFormat: 'yy-mm-dd' };
            $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
        });
        function openWindow(flg) {
            var param = '&start=' + document.getElementById('start-date').value;
            param += '&end=' + document.getElementById('end-date').value;
            var url = 'GetExcelData.aspx?flg=' + flg + param;
            window.open(url);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <label for="start-date">
            START DATE:</label>
        <input name="start-date" id="start-date" class="date-pick" />
        <label for="end-date">
            END DATE:</label>
        <input name="end-date" id="end-date" class="date-pick" />
        <input id="Button1" type="button" value="导出" onclick="openWindow('1');" />
    </div>
    </form>
</body>
</html>
